package com.nut.lmsc.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 事务提交后事件
 **/
public class TransactionCommitEvent extends ApplicationEvent {

    private static final long serialVersionUID = 5885956821347953071L;


    @Getter
    private final String topic;

    @Getter
    private final String tag;

    @Getter
    private final Object message;

    public TransactionCommitEvent(Object source, String topic, String tag, Object message) {
        super(source);
        this.topic = topic;
        this.tag = tag;
        this.message = message;
    }

    @Override
    public String toString() {
        return "TransactionCommitSendMQEvent{" +
                "topic='" + topic + '\'' +
                ", tag='" + tag + '\'' +
                ", message=" + message +
                '}';
    }
}
